/**
 * @file   1096.cpp
 * @author Shuang Hu <hsmath@ubuntu>
 * @date   Thu Apr 29 01:38:26 2021
 * 
 * @brief  PAT advanced,Problem 1096
 * 
 * 
 */
#include<iostream>
#include<cmath>
#include<vector>
#include<queue>
using namespace std;
int main(){
    long int N;
    long int fptr,rptr,len;
    fptr=rptr=0;
    len=-1;
    long int nowf,nowr;
    nowf=nowr=0;
    cin>>N;
    vector<long int> factories;
    for(long int i=1;i<sqrt(N);i++){
	if(N%i==0){
	    factories.push_back(i);
	}
    }
    if(factories.size()>1){
	nowf=nowr=1;
    }
    for(int i=1;i<factories.size();i++){
	nowf=i;
	for(int j=i+1;j<factories.size();j++){
	    if(factories[j]==factories[j-1]+1){
		nowr=j;
	    }else{
		break;
	    }
	}
	if(nowr-nowf>len){
	    fptr=nowf;
	    rptr=nowr;
	    len=nowr-nowf;
	}
    }
    if(factories.size()==1){
	cout<<"1"<<endl;
	cout<<N<<endl;
    }else{
	len++;
	cout<<len<<endl;
	cout<<factories[fptr];
	for(long int i=fptr+1;i<=rptr;i++){
	    cout<<"*"<<factories[i];
	}
	cout<<endl;
    }
}
